﻿using Microsoft.Extensions.DependencyInjection;
using StartsEAS_API.BLL.Interfaces.IPositionInB;
using StartsEAS_API.DAL.PositionInD;
using StartsEAS_API.Model;
using StartsEAS_API.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StartsEAS_API.BLL.PositionInB
{
    public class PositionInBLL : IPositionInBLL
    {
        private readonly StarsEASContext _context;
        public PositionInDAL _positionInDal;
        public PositionInBLL(IServiceScopeFactory context)
        {
            _context = context.CreateScope().ServiceProvider.GetRequiredService<StarsEASContext>();
            _positionInDal = new(_context);
        }

        public ResultUtils GetAllPositionIn()
        {
            return _positionInDal.GetAllPositionIn();
        }
    }
}
